import request from '@/utils/http'

// 一级分类
export function getCategoryAPI(id) {
  return request({
    url: '/category',
    params: {
      id
    }
  })
}

// 二级分类
export function getCategoryFilterAPI(id) {
  return request({
    url: '/category/sub/filter',
    params: {
      id
    }
  })
}

// 二级分类列表
export function getSubCategoryAPI(data) {
  return request({
    url: '/category/goods/temporary',
    method: 'post',
    data
  })
}